//统一管理咱们项目用户相关的接口

import {Get, Post} from "@/utils/request";
import { loginForm, respLoginData, regForm } from './types/user'
//项目用户相关的请求地址
const API = {
  LOGIN_URL: '/bioinfor/auth/login',
  REGISTER_URL: '/bioinfor/auth/register',
  GET_USER_DETAIL: '/bbs/api/ucenter/getUserInfo'
}

//登录接口
export const reqLogin = (reqData: loginForm) =>
  Post<respLoginData>(API.LOGIN_URL, reqData)
//注册接口
export const reqRegister = (reqData: regForm) =>
  Post<string>(API.REGISTER_URL, reqData)
export const getUserDetail = () =>
    Get<string>(API.GET_USER_DETAIL)
